<?php

namespace common\repositories\myhtsq;

use Yii;
use common\entities\myhtsq\ActionEntity;
use common\repositories\BaseRepository;

class ActionRepository extends BaseRepository {

    /**
     * 构造方法
     * @param unknown $config (optional)
     */
    public function __construct($config = []) {
        parent::__construct($config);
    }

    /**
     * 获取功能包对应的动作点列表
     * @param integer $packageId 功能包ID
     * @return array \common\models\auth\Action[] 动作点列表
     */
    public static function getActionsByPackageId($packageId) {
        return ActionEntity::find()->where(['action_package_id' => $packageId])->all();
    }

}
